package com.xingdata.jjxc.utils;

import com.xingdata.jjxc.utils.callback.DelayThreadCallBack;

/**
 * 
* 项目名称：JJXC_VPN   
* 类名称：DelayThread   
* 类描述：自定义等待线程   
* 创建人：JiangMin 
* 创建时间：2015-7-3 下午11:17:33    
* 修改备注：   
* @version    
*
 */
public class DelayThread extends Thread {
	private long delayTime;
	private DelayThreadCallBack callBack = null ;
	public DelayThread(DelayThreadCallBack callBack,int i) {
		this.callBack=callBack;
		this.delayTime=i;
	}
	
	@Override
	public void run() {
		super.run();
		callBack.start();
		long startTime=System.currentTimeMillis();
		long endTime=System.currentTimeMillis();
		while ((endTime-startTime)<delayTime) {
			endTime=System.currentTimeMillis();
		}
		callBack.finsh();
	}
}
